<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?a7c05ce530152d9866930ef4850ee566"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    
    
    
    <title>腾讯云Centos7.2使用Docker搭建JavaWeb运行环境 | 神奇的鸭鸭の码农库 | 新知识要不断的总结记录成笔记，要多写，多画，能够清晰透彻的将知识讲给别人听，才是达到理解的层次。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#765959">
    
    
    <meta name="keywords" content="环境搭建">
    <meta name="description" content="最近完成了吐槽模块，打算放到服务器上展示展示。http://sqdyy.cn:8888/spitslot 听说现在都用Docker容器快速部署项目，今天就弄来简单玩一玩，也算入个门。 在centos上安装docker前置条件 64-bit 系统 kernel 3.10+s检查内核版本，返回值大于3.10即可1uname -r   确保yum是最新的1yum update 添加yum仓库123456">
<meta name="keywords" content="环境搭建">
<meta property="og:type" content="article">
<meta property="og:title" content="腾讯云Centos7.2使用Docker搭建JavaWeb运行环境">
<meta property="og:url" content="http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/index.html">
<meta property="og:site_name" content="神奇的鸭鸭の码农库">
<meta property="og:description" content="最近完成了吐槽模块，打算放到服务器上展示展示。http://sqdyy.cn:8888/spitslot 听说现在都用Docker容器快速部署项目，今天就弄来简单玩一玩，也算入个门。 在centos上安装docker前置条件 64-bit 系统 kernel 3.10+s检查内核版本，返回值大于3.10即可1uname -r   确保yum是最新的1yum update 添加yum仓库123456">
<meta property="og:updated_time" content="2017-12-05T10:18:17.774Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="腾讯云Centos7.2使用Docker搭建JavaWeb运行环境">
<meta name="twitter:description" content="最近完成了吐槽模块，打算放到服务器上展示展示。http://sqdyy.cn:8888/spitslot 听说现在都用Docker容器快速部署项目，今天就弄来简单玩一玩，也算入个门。 在centos上安装docker前置条件 64-bit 系统 kernel 3.10+s检查内核版本，返回值大于3.10即可1uname -r   确保yum是最新的1yum update 添加yum仓库123456">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.4.3">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">神奇的鸭鸭</h5>
          <a href="mailto:702038338@qq.com" title="702038338@qq.com" class="mail">702038338@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/magic_duck" target="_blank" >
                <i class="icon icon-lg icon-gg-circle"></i>
                码云
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.zhihu.com/people/shen-qi-de-ya-ya" target="_blank" >
                <i class="icon icon-lg icon-twitter"></i>
                知乎
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/404.html"  >
                <i class="icon icon-lg icon-link"></i>
                404页面测试
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">腾讯云Centos7.2使用Docker搭建JavaWeb运行环境</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">腾讯云Centos7.2使用Docker搭建JavaWeb运行环境</h1>
        <h5 class="subtitle">
            
                <time datetime="2017-10-18T16:00:00.000Z" itemprop="datePublished" class="page-time">
  2017-10-19
</time>


            
        </h5>
    </div>

    

</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#在centos上安装docker"><span class="post-toc-number">1.</span> <span class="post-toc-text">在centos上安装docker</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#前置条件"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">前置条件</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#检查内核版本，返回值大于3-10即可"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">检查内核版本，返回值大于3.10即可</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#确保yum是最新的"><span class="post-toc-number">1.3.</span> <span class="post-toc-text">确保yum是最新的</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#添加yum仓库"><span class="post-toc-number">1.4.</span> <span class="post-toc-text">添加yum仓库</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#安装docker"><span class="post-toc-number">1.5.</span> <span class="post-toc-text">安装docker</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#启动docker"><span class="post-toc-number">1.6.</span> <span class="post-toc-text">启动docker</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#验证安装是否成功-有client和service两部分表示安装成功"><span class="post-toc-number">1.7.</span> <span class="post-toc-text">验证安装是否成功(有client和service两部分表示安装成功)</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#在docker上安装mysql"><span class="post-toc-number">2.</span> <span class="post-toc-text">在docker上安装mysql</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#拉取mysql镜像"><span class="post-toc-number">2.1.</span> <span class="post-toc-text">拉取mysql镜像</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#使用mysql镜像"><span class="post-toc-number">2.2.</span> <span class="post-toc-text">使用mysql镜像</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#查看容器启动情况"><span class="post-toc-number">2.3.</span> <span class="post-toc-text">查看容器启动情况</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#使用mysql-client来访问数据库"><span class="post-toc-number">2.4.</span> <span class="post-toc-text">使用mysql-client来访问数据库</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#在docker上安装tomcat"><span class="post-toc-number">3.</span> <span class="post-toc-text">在docker上安装tomcat</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#拉取tomcat镜像"><span class="post-toc-number">3.1.</span> <span class="post-toc-text">拉取tomcat镜像</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#自定义Docker镜像"><span class="post-toc-number">3.2.</span> <span class="post-toc-text">自定义Docker镜像</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#创建自定义Docker镜像"><span class="post-toc-number">3.3.</span> <span class="post-toc-text">创建自定义Docker镜像</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#检查自定义的镜像"><span class="post-toc-number">3.4.</span> <span class="post-toc-text">检查自定义的镜像</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#使用ulewo镜像"><span class="post-toc-number">3.5.</span> <span class="post-toc-text">使用ulewo镜像</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#常用命令"><span class="post-toc-number">4.</span> <span class="post-toc-text">常用命令</span></a></li></ol>
        </nav>
    </aside>
    
<article id="post-cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">腾讯云Centos7.2使用Docker搭建JavaWeb运行环境</h1>
        <div class="post-meta">
            <time class="post-time" title="2017年10月19日 0:00" datetime="2017-10-18T16:00:00.000Z"  itemprop="datePublished">2017-10-19</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <p>最近完成了吐槽模块，打算放到服务器上展示展示。<a href="http://sqdyy.cn:8888/spitslot" target="_blank" rel="external">http://sqdyy.cn:8888/spitslot</a> 听说现在都用Docker容器快速部署项目，今天就弄来简单玩一玩，也算入个门。</p>
<h2 id="在centos上安装docker"><a href="#在centos上安装docker" class="headerlink" title="在centos上安装docker"></a>在centos上安装docker</h2><h3 id="前置条件"><a href="#前置条件" class="headerlink" title="前置条件"></a>前置条件</h3><ul>
<li>64-bit 系统</li>
<li>kernel 3.10+<br>s<h3 id="检查内核版本，返回值大于3-10即可"><a href="#检查内核版本，返回值大于3-10即可" class="headerlink" title="检查内核版本，返回值大于3.10即可"></a>检查内核版本，返回值大于3.10即可</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">uname -r</div></pre></td></tr></table></figure>
</li>
</ul>
<h3 id="确保yum是最新的"><a href="#确保yum是最新的" class="headerlink" title="确保yum是最新的"></a>确保yum是最新的</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">yum update</div></pre></td></tr></table></figure>
<h3 id="添加yum仓库"><a href="#添加yum仓库" class="headerlink" title="添加yum仓库"></a>添加yum仓库</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">tee /etc/yum.repos.d/docker.repo &lt;&lt;-'EOF' </div><div class="line">[dockerrepo] </div><div class="line">name=Docker Repository </div><div class="line">baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/ </div><div class="line">enabled=1</div><div class="line">gpgcheck=1</div><div class="line">gpgkey=https://yum.dockerproject.org/gpg </div><div class="line">EOF</div></pre></td></tr></table></figure>
<h3 id="安装docker"><a href="#安装docker" class="headerlink" title="安装docker"></a>安装docker</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">yum install -y docker-engine</div></pre></td></tr></table></figure>
<h3 id="启动docker"><a href="#启动docker" class="headerlink" title="启动docker"></a>启动docker</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">systemctl start docker.service</div></pre></td></tr></table></figure>
<h3 id="验证安装是否成功-有client和service两部分表示安装成功"><a href="#验证安装是否成功-有client和service两部分表示安装成功" class="headerlink" title="验证安装是否成功(有client和service两部分表示安装成功)"></a>验证安装是否成功(有client和service两部分表示安装成功)</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div></pre></td><td class="code"><pre><div class="line">[root@VM_57_106_centos ~]# docker version</div><div class="line">Client:</div><div class="line"> Version:      17.05.0-ce</div><div class="line"> API version:  1.29</div><div class="line"> Go version:   go1.7.5</div><div class="line"> Git commit:   89658be</div><div class="line"> Built:        Thu May  4 22:06:25 2017</div><div class="line"> OS/Arch:      linux/amd64</div><div class="line"></div><div class="line">Server:</div><div class="line"> Version:      17.05.0-ce</div><div class="line"> API version:  1.29 (minimum version 1.12)</div><div class="line"> Go version:   go1.7.5</div><div class="line"> Git commit:   89658be</div><div class="line"> Built:        Thu May  4 22:06:25 2017</div><div class="line"> OS/Arch:      linux/amd64</div><div class="line"> Experimental: false</div></pre></td></tr></table></figure>
<hr>
<h2 id="在docker上安装mysql"><a href="#在docker上安装mysql" class="headerlink" title="在docker上安装mysql"></a>在docker上安装mysql</h2><p>来源：<a href="https://c.163.com/hub#/m/repository/?repoId=2955" target="_blank" rel="external">https://c.163.com/hub#/m/repository/?repoId=2955</a></p>
<h3 id="拉取mysql镜像"><a href="#拉取mysql镜像" class="headerlink" title="拉取mysql镜像"></a>拉取mysql镜像</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">docker pull hub.c.163.com/library/mysql:latest</div></pre></td></tr></table></figure>
<h3 id="使用mysql镜像"><a href="#使用mysql镜像" class="headerlink" title="使用mysql镜像"></a>使用mysql镜像</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">docker run --name ulewo-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=密码 -d hub.c.163.com/library/mysql</div></pre></td></tr></table></figure>
<h3 id="查看容器启动情况"><a href="#查看容器启动情况" class="headerlink" title="查看容器启动情况"></a>查看容器启动情况</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">[root@VM_57_106_centos /]# docker ps</div><div class="line">CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                    NAMES</div><div class="line">923255e57ee1        hub.c.163.com/library/mysql   "docker-entrypoint..."   14 seconds ago      Up 12 seconds       0.0.0.0:3306-&gt;3306/tcp   ulewo-mysql</div></pre></td></tr></table></figure>
<p>dc</p>
<h3 id="使用mysql-client来访问数据库"><a href="#使用mysql-client来访问数据库" class="headerlink" title="使用mysql-client来访问数据库"></a>使用mysql-client来访问数据库</h3><hr>
<h2 id="在docker上安装tomcat"><a href="#在docker上安装tomcat" class="headerlink" title="在docker上安装tomcat"></a>在docker上安装tomcat</h2><p>来源：<a href="https://c.163.com/hub#/m/repository/?repoId=3105" target="_blank" rel="external">https://c.163.com/hub#/m/repository/?repoId=3105</a></p>
<h3 id="拉取tomcat镜像"><a href="#拉取tomcat镜像" class="headerlink" title="拉取tomcat镜像"></a>拉取tomcat镜像</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">docker pull hub.c.163.com/library/tomcat:latest</div></pre></td></tr></table></figure>
<h3 id="自定义Docker镜像"><a href="#自定义Docker镜像" class="headerlink" title="自定义Docker镜像"></a>自定义Docker镜像</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line">mkdir ulewo</div><div class="line">mkdir ulewo/docker // 放dockerfile</div><div class="line">mkdir ulewo/upload // 图片上传路径</div><div class="line">cd ulewo/docker/</div><div class="line">vi Dockerfile</div><div class="line"></div><div class="line">from hub.c.163.com/library/tomcat</div><div class="line">MAINTTAINER sqdyy 702038338@qq.com</div><div class="line">COPY ulewoTest.war /usr/local/tomcat/webapps/</div></pre></td></tr></table></figure>
<h3 id="创建自定义Docker镜像"><a href="#创建自定义Docker镜像" class="headerlink" title="创建自定义Docker镜像"></a>创建自定义Docker镜像</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line">[root@VM_57_106_centos docker]# docker build -t ulewo:latest .</div><div class="line">Sending build context to Docker daemon  30.87MB</div><div class="line">Step 1/3 : FROM hub.c.163.com/library/tomcat</div><div class="line"><span class="meta"> ---&gt;</span> 72d2be374029</div><div class="line">Step 2/3 : MAINTAINER sqdyy 702038338@qq.com</div><div class="line"><span class="meta"> ---&gt;</span> Using cache</div><div class="line"><span class="meta"> ---&gt;</span> 3a5bdebfb4a7</div><div class="line">Step 3/3 : COPY ulewo.war /usr/local/tomcat/webapps/</div><div class="line"><span class="meta"> ---&gt;</span> Using cache</div><div class="line"><span class="meta"> ---&gt;</span> 7a791e8df485</div><div class="line">Successfully built 7a791e8df485</div><div class="line">Successfully tagged ulewo:latest</div></pre></td></tr></table></figure>
<h3 id="检查自定义的镜像"><a href="#检查自定义的镜像" class="headerlink" title="检查自定义的镜像"></a>检查自定义的镜像</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">[root@VM_57_106_centos docker]# docker images</div><div class="line">REPOSITORY                     TAG                 IMAGE ID            CREATED              SIZE</div><div class="line">ulewo                          latest              7a791e8df485        About a minute ago   323MB</div><div class="line">hub.c.163.com/library/tomcat   latest              72d2be374029        2 months ago         292MB</div><div class="line">hub.c.163.com/library/mysql    latest              9e64176cd8a2        5 months ago         407MB</div></pre></td></tr></table></figure>
<h3 id="使用ulewo镜像"><a href="#使用ulewo镜像" class="headerlink" title="使用ulewo镜像"></a>使用ulewo镜像</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">docker run -p 8888:8080 ulewo</div></pre></td></tr></table></figure>
<p>至此，已成功把web应用部署在Docker容器运行</p>
<h2 id="常用命令"><a href="#常用命令" class="headerlink" title="常用命令"></a>常用命令</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span> 查看所有镜像</div><div class="line">docker images</div><div class="line"></div><div class="line"><span class="meta">#</span> 正在运行容器</div><div class="line">docker ps</div><div class="line"></div><div class="line"><span class="meta">#</span> 查看docker容器</div><div class="line">docker ps -a</div><div class="line"></div><div class="line"><span class="meta">#</span> 启动tomcat:7镜像</div><div class="line">docker run -p 8080:8080 tomcat:7</div><div class="line"></div><div class="line"><span class="meta">#</span> 以后台守护进程的方式启动</div><div class="line">docker run -d tomcat:7</div><div class="line"></div><div class="line"><span class="meta">#</span> 停止一个容器</div><div class="line">docker stop b840db1d182b</div><div class="line"></div><div class="line"><span class="meta">#</span> 进入一个容器</div><div class="line">docker attach d48b21a7e439</div><div class="line"></div><div class="line"><span class="meta">#</span> 进入正在运行容器并以命令行交互</div><div class="line">docker exec -it e9410ee182bd /bin/sh</div><div class="line"></div><div class="line"><span class="meta">#</span> 以交互的方式运行</div><div class="line">docker run -i -t -p 8081:8080 tomcat:7 /bin/bash</div></pre></td></tr></table></figure>
        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2017-12-05T10:18:17.774Z" itemprop="dateUpdated">2017年12月5日 18:18</time>
</span><br>


        如要转载请注明出处：<a href="/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/" target="_blank" rel="external">http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/</a>
    </div>
    <footer>
        <a href="http://magic_duck.oschina.io">
            <img src="/img/avatar.jpg" alt="神奇的鸭鸭">
            神奇的鸭鸭
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/环境搭建/">环境搭建</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/&title=《腾讯云Centos7.2使用Docker搭建JavaWeb运行环境》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/&title=《腾讯云Centos7.2使用Docker搭建JavaWeb运行环境》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《腾讯云Centos7.2使用Docker搭建JavaWeb运行环境》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2017/10/22/java_enhance1_封装/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">java提高篇(一) 理解java的三大特性之封装</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/09/07/redis4.4.0_primary_06/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">Jedis连接Reis集群</h4>
      </a>
    </div>
  
</nav>



    







</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        我只要一角钱~ ~
        <i class="icon icon-quote-right"></i>
    </h3>
    <ul class="reward-items">
        
        <li>
            <img src="/img/wechat.png" title="微信打赏二维码" alt="微信打赏二维码">
            <p>微信</p>
        </li>
        

        
        <li>
            <img src="/img/alipay.jpg" title="支付宝打赏二维码" alt="支付宝打赏二维码">
            <p>支付宝</p>
        </li>
        
    </ul>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://git.oschina.net/z77z" target="_blank">邹海清</a></span>
            <span>神奇的鸭鸭の码农库 &copy; 2017</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/&title=《腾讯云Centos7.2使用Docker搭建JavaWeb运行环境》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/&title=《腾讯云Centos7.2使用Docker搭建JavaWeb运行环境》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《腾讯云Centos7.2使用Docker搭建JavaWeb运行环境》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://magic_duck.oschina.io/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };



lazyScripts.push('//s95.cnzz.com/z_stat.php?id=1261081671&web_id=1261081671')

</script>

<script src="/js/main.min.js?v=1.4.3"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.4.3" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>


</body>
</html>
